import XCTest

@testable import WordPress

class UITextFieldTextHelperTests: XCTestCase {

    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }

    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }

    func testNonNilTrimmedText() {
        let textField = UITextField()

        XCTAssert(textField.nonNilTrimmedText().isEmpty)

        let exampleText = "example"
        textField.text = exampleText

        XCTAssert(textField.nonNilTrimmedText() == exampleText)
    }
}
